---
title: Code table loading
summary: Load and cache 31 code-table lookups.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-26
library: SAIF.Business.Claim.Legal
reference_type: embedded
operation_id: code-table-loading
trigger: First access via GetCodeTable(Of T) for a given code table
---

# Code table loading

Provides cached, on-demand loading of the library's 31 code/reference-table lookups (ALJ list,
attorney lists, schedule/status/type codes, hearing locations, and other lookup collections) through a
shared generic loader.

| Field | Value |
| --- | --- |
| **Operation ID** | code-table-loading |
| **Trigger** | First access via `GetCodeTable(Of T)` |
| **Inputs** | — |
| **Outputs** | Cached code-table collections |
| **Primary components** | `mdlCodeTables.GetCodeTable(Of T)`, and its 31 typed wrappers (e.g. `GetALJList`, `GetActiveAttorneyList`, `GetAttorneyScheduleTypeCode`, `GetHearingLocationCode`, `GetScheduleStatusCode`) |
| **Entry point** | `SAIF.Business.Claim.Legal\mdlCodeTables.vb` |

## Steps

1. A caller invokes one of the 31 typed accessor functions (e.g. `GetHearingLocationCode(inDPI,
   inRefresh)`).
2. Each accessor delegates to the shared generic `GetCodeTable(Of T)(inCodeTable, inRefresh,
   inTableGetter)` helper.
3. `GetCodeTable` returns the cached collection unless it is unset or `inRefresh` is `True`, in which
   case it invokes the supplied `inTableGetter` lambda to reload the collection from Oracle and caches
   the result for subsequent calls.

## Process flow

```mermaid
flowchart TD
	Start(["Typed accessor called<br>e.g. GetHearingLocationCode"]) --> Cached{"Cached and<br>not refreshing?"}
	Cached -->|Yes| Return(["Return cached<br>collection"])
	Cached -->|No| Load["Invoke table-specific<br>getter lambda"]
	Load --> Cache["Cache loaded<br>collection"]
	Cache --> Return
```

## Failure and edge-case behavior
- No exceptional behavior beyond standard read failure handling was identified for this operation.*

## Related documentation
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `SAIF.Business.Claim.Legal\mdlCodeTables.vb`
